home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / gnustuff / tos / doc / gcc.brf < prev    next >
Text File  |  1995-04-22  |  71KB  |  1,868 lines

  1. GCC(1)                    USER COMMANDS                    GCC(1)
  2.  
  3. NAME
  4.      gcc - GNU project C Compiler
  5.  
  6. SYNOPSIS
  7.      gcc [ options ] files
  8.  
  9. WARNING
  10.      This man page is an extract of the documentation of the  GNU
  11.      C compiler and is limited to the meaning of the options.  It
  12.      is updated only occasionally, because the GNU  project  does
  13.      not  use  nroff.  For complete, current documentation, refer
  14.      to the Info file gcc or the DVI file gcc.dvi which are  made
  15.      from the Texinfo source file gcc.texinfo.
  16.  
  17. DESCRIPTION
  18.      The GNU C compiler uses a command syntax much like the  Unix
  19.      C  compiler.  The gcc program accepts options and file names
  20.      as operands.  Multiple  single-letter  options  may  not  be
  21.      grouped:  -dr is very different from -d -r.  When you invoke
  22.      GNU CC, it normally does preprocessing, compilation,  assem-
  23.      bly  and linking.  File names which end in .c are taken as C
  24.      source to be preprocessed and compiled; file names ending in
  25.      .i are taken as preprocessor output to be compiled; compiler
  26.      output files plus any input files with names  ending  in  .s
  27.      are  assembled;  then  the  resulting object files, plus any
  28.      other input files, are linked together to produce an execut-
  29.      able.   Command options allow you to stop this process at an
  30.      intermediate stage.  For example, the -c option says not  to
  31.      run  the  linker.   Then the output consists of object files
  32.      output by the assembler.  Other command options  are  passed
  33.      on  to  one  stage  of processing.  Some options control the
  34.      preprocessor and others  the  compiler  itself.   Yet  other
  35.      options  control  the  assembler  and  linker; these are not
  36.      documented here, but you rarely need to use any of them.
  37.  
  38. OPTIONS
  39.      Here are the options to control the overall compilation pro-
  40.      cess,  including  those that say whether to link, whether to
  41.      assemble, and so on.
  42.  
  43.      -o file
  44.           Place output in file file.  This applies regardless  to
  45.           whatever  sort  of output is being produced, whether it
  46.           be an executable file, an  object  file,  an  assembler
  47.           file or preprocessed C code.
  48.  
  49.           If -o is not specified, the default is to put  an  exe-
  50.           cutable  file  in  a.out,  the  object file source.c in
  51.           source.o, an assembler file in  source.s,  and  prepro-
  52.           cessed C on standard output.
  53.  
  54.      -c   Compile or assemble the source files, but do not  link.
  55.  
  56. Version 1.36        Last change: 18 June 1989                   1
  57.  
  58. GCC(1)                    USER COMMANDS                    GCC(1)
  59.  
  60.           Produce object files with names made by replacing .c or
  61.           .s with .o at the end of  the  input  file  names.   Do
  62.           nothing at all for object files specified as input.
  63.  
  64.      -S   Compile into assembler code but do not  assemble.   The
  65.           assembler output file name is made by replacing .c with
  66.           .s at the end of the input file name.   Do  nothing  at
  67.           all  for  assembler source files or object files speci-
  68.           fied as input.
  69.  
  70.      -E   Run only the C  preprocessor.   Preprocess  all  the  C
  71.           source  files specified and output the results to stan-
  72.           dard output.
  73.  
  74.      -v   Compiler driver program prints the commands it executes
  75.           as it runs the preprocessor, compiler proper, assembler
  76.           and linker.  Some of these are directed to print  their
  77.           own version numbers.
  78.  
  79.      -pipe
  80.           Use pipes rather than temporary files for communication
  81.           between  the various stages of compilation.  This fails
  82.           to work on some systems where the assembler  is  unable
  83.           to read from a pipe; but the GNU assembler has no trou-
  84.           ble.
  85.  
  86.      -Bprefix
  87.           Compiler driver program tries prefix as  a  prefix  for
  88.           each  program it tries to run.  These programs are cpp,
  89.           cc1, as and ld.
  90.  
  91.           For each subprogram to  be  run,  the  compiler  driver
  92.           first tries the -B prefix, if any.  If that name is not
  93.           found, or if -B was not specified, the driver tries two
  94.           standard   prefixes,   which   are   /usr/lib/gcc-  and
  95.           /usr/local/lib/gcc-.  If neither of those results in  a
  96.           file name that is found, the unmodified program name is
  97.           searched for using the directories  specified  in  your
  98.           PATH environment variable.
  99.  
  100.           The run-time support file gnulib is also  searched  for
  101.           using  the  -B  prefix,  if needed.  If it is not found
  102.           there, the two standard prefixes above are  tried,  and
  103.           that is all.  The file is left out of the link if it is
  104.           not found by those means.  Most of the  time,  on  most
  105.           machines, you can do without it.
  106.  
  107.           You can get a similar result from the environment vari-
  108.           able  GCC_EXEC_PREFIX;  if  it is defined, its value is
  109.           used as a prefix in the  same  way.   If  both  the  -B
  110.           option  and  the  GCC_EXEC_PREFIX variable are present,
  111.           the  -B  option  is  used  first  and  the  environment
  112.  
  113. Version 1.36        Last change: 18 June 1989                   2
  114.  
  115. GCC(1)                    USER COMMANDS                    GCC(1)
  116.  
  117.           variable value second.
  118.  
  119.      -bprefix
  120.           The argument prefix is used as a second prefix for  the
  121.           compiler  executables  and  libraries.   This prefix is
  122.           optional: the compiler tries each file first  with  it,
  123.           then without it.  This prefix follows the prefix speci-
  124.           fied with -B or the default prefixes.
  125.  
  126.           Thus, -bvax- -Bcc/ in the presence of environment vari-
  127.           able GCC_EXEC_PREFIX with definition /u/foo/ causes GNU
  128.           CC to try the following file names for the preprocessor
  129.           executable:
  130.  
  131.                cc/vax-cpp
  132.                cc/cpp
  133.                /u/foo/vax-cpp
  134.                /u/foo/cpp
  135.                /usr/local/lib/gcc-vax-cpp
  136.                /usr/local/lib/gcc-cpp
  137.                /usr/lib/gcc-vax-cpp
  138.                /usr/lib/gcc-cpp These options control the details
  139.           of C compilation itself.
  140.  
  141.      -ansi
  142.           Support all ANSI standard C programs.
  143.  
  144.           This turns off certain  features  of  GNU  C  that  are
  145.           incompatible  with  ANSI C, such as the asm, inline and
  146.           typeof keywords, and predefined macros such as unix and
  147.           vax that identify the type of system you are using.  It
  148.           also enables the undesirable and rarely used ANSI  tri-
  149.           graph feature.
  150.  
  151.           The  alternate   keywords   __asm__,   __inline__   and
  152.           __typeof__  continue  to work despite -ansi.  You would
  153.           not want to use them in an ANSI C program,  of  course,
  154.           but it useful to put them in header files that might be
  155.           included in compilations done  with  -ansi.   Alternate
  156.           predefined macros such as __unix__ and __vax__ are also
  157.           available, with or without -ansi.
  158.  
  159.           The -ansi option does not cause non-ANSI programs to be
  160.           rejected gratuitously.  For that, -pedantic is required
  161.           in addition to -ansi.
  162.  
  163.           The macro __STRICT_ANSI__ is predefined when the  -ansi
  164.           option  is  used.   Some  header  files may notice this
  165.           macro and refrain from declaring certain  functions  or
  166.           defining  certain macros that the ANSI standard doesn't
  167.           call for; this is to avoid interfering  with  any  pro-
  168.           grams that might use these names for other things.
  169.  
  170. Version 1.36        Last change: 18 June 1989                   3
  171.  
  172. GCC(1)                    USER COMMANDS                    GCC(1)
  173.  
  174.      -traditional
  175.           Attempt to support some aspects of traditional  C  com-
  176.           pilers.  Specifically:
  177.  
  178.         * All extern declarations take effect  globally  even  if
  179.           they are written inside of a function definition.  This
  180.           includes implicit declarations of functions.
  181.  
  182.         * The keywords typeof, inline, signed, const and volatile
  183.           are not recognized.
  184.  
  185.         * Comparisons between pointers and  integers  are  always
  186.           allowed.
  187.  
  188.         * Integer types unsigned short and unsigned char  promote
  189.           to unsigned int.
  190.  
  191.         * Out-of-range floating point literals are not an error.
  192.  
  193.         * All  automatic  variables  not  declared  register  are
  194.           preserved  by  longjmp(3C).   Ordinarily, GNU C follows
  195.           ANSI C: automatic variables not declared  volatile  may
  196.           be clobbered.
  197.  
  198.         * In the preprocessor, comments  convert  to  nothing  at
  199.           all,  rather  than to a space.  This allows traditional
  200.           token concatenation.
  201.  
  202.         * In the preprocessor,  macro  arguments  are  recognized
  203.           within  string  constants  in  a  macro definition (and
  204.           their values are stringified, though without additional
  205.           quote  marks, when they appear in such a context).  The
  206.           preprocessor always considers a string constant to  end
  207.           at a newline.
  208.  
  209.         * The predefined macro __STDC__ is not defined  when  you
  210.           use -traditional, but __GNUC__ is (since the GNU exten-
  211.           sions which __GNUC__  indicates  are  not  affected  by
  212.           -traditional).   If you need to write header files that
  213.           work differently depending on whether  -traditional  is
  214.           in  use, by testing both of these predefined macros you
  215.           can distinguish four situations: GNU C, traditional GNU
  216.           C, other ANSI C compilers, and other old C compilers.
  217.  
  218.      -O   Optimize.  Optimizing compilation takes  somewhat  more
  219.           time, and a lot more memory for a large function.
  220.  
  221.           Without -O, the compiler's goal is to reduce  the  cost
  222.           of  compilation  and  to  make  debugging  produce  the
  223.           expected results.  Statements are independent:  if  you
  224.           stop  the program with a breakpoint between statements,
  225.           you can then assign a new  value  to  any  variable  or
  226.  
  227. Version 1.36        Last change: 18 June 1989                   4
  228.  
  229. GCC(1)                    USER COMMANDS                    GCC(1)
  230.  
  231.           change  the  program  counter to any other statement in
  232.           the function and get  exactly  the  results  you  would
  233.           expect from the source code.
  234.  
  235.           Without -O, only variables declared register are  allo-
  236.           cated  in  registers.  The resulting compiled code is a
  237.           little worse than produced by PCC without -O.
  238.  
  239.           With -O, the compiler tries to  reduce  code  size  and
  240.           execution time.
  241.  
  242.           Some of the -f options described  below  turn  specific
  243.           kinds of optimization on or off.
  244.  
  245.      -g   Produce debugging information in the operating system's
  246.           native format (for DBX or SDB).  GDB also can work with
  247.           this debugging information.
  248.  
  249.           Unlike most other C compilers, GNU CC allows you to use
  250.           -g  with -O.  The shortcuts taken by optimized code may
  251.           occasionally produce surprising results: some variables
  252.           you  declared may not exist at all; flow of control may
  253.           briefly move where you did not expect it;  some  state-
  254.           ments may not be executed because they compute constant
  255.           results or their values  were  already  at  hand;  some
  256.           statements may execute in different places because they
  257.           were moved out of loops.  Nevertheless it proves possi-
  258.           ble  to  debug optimized output.  This makes it reason-
  259.           able to use the optimizer for programs that might  have
  260.           bugs.
  261.  
  262.      -gg  Produce debugging  information  in  GDB's  own  format.
  263.           This  requires the GNU assembler and linker in order to
  264.           work.
  265.  
  266.           This feature  will  probably  be  eliminated.   It  was
  267.           intended to enable GDB to read the symbol table faster,
  268.           but it doesn't result in enough  of  a  speedup  to  be
  269.           worth  the larger object files and executables.  We are
  270.           working on other ways of making GDB start even  faster,
  271.           which  work  with  DBX format debugging information and
  272.           could be made to work with SDB format.
  273.  
  274.      -w   Inhibit all warning messages.
  275.  
  276.      -W   Print extra warning messages for these events:
  277.  
  278.         * An automatic variable is used without first being  ini-
  279.           tialized.
  280.  
  281.           These warnings are possible only in optimizing compila-
  282.           tion,  because  they require data flow information that
  283.  
  284. Version 1.36        Last change: 18 June 1989                   5
  285.  
  286. GCC(1)                    USER COMMANDS                    GCC(1)
  287.  
  288.           is computed only when optimizing.  If you don't specify
  289.           -O, you simply won't get these warnings.
  290.  
  291.           These warnings occur only for variables that are candi-
  292.           dates  for register allocation.  Therefore, they do not
  293.           occur for a variable  that  is  declared  volatile,  or
  294.           whose  address is taken, or whose size is other than 1,
  295.           2, 4 or 8 bytes.  Also, they do not  occur  for  struc-
  296.           tures,  unions  or arrays, even when they are in regis-
  297.           ters.
  298.  
  299.           Note that there may be no warning about a variable that
  300.           is  used  only  to compute a value that itself is never
  301.           used, because such computations may be deleted by  data
  302.           flow analysis before the warnings are printed.
  303.  
  304.           These warnings are made optional because GNU CC is  not
  305.           smart  enough to see all the reasons why the code might
  306.           be correct despite appearing to have an error.  Here is
  307.           one example of how this can happen:
  308.  
  309.                {
  310.                  int x;
  311.                  switch (y)
  312.                    {
  313.                    case 1: x = 1;
  314.                      break;
  315.                    case 2: x = 4;
  316.                      break;
  317.                    case 3: x = 5;
  318.                    }
  319.                  foo (x);
  320.                }
  321.  
  322.           If the value of y is always 1, 2 or 3, then x is always
  323.           initialized,  but  GNU  CC  doesn't know this.  Here is
  324.           another common case:
  325.  
  326.                {
  327.                  int save_y;
  328.                  if (change_y) save_y = y, y = new_y;
  329.                  ...
  330.                  if (change_y) y = save_y;
  331.                }
  332.  
  333.           This has no bug because save_y is used only  if  it  is
  334.           set.
  335.  
  336.           Some spurious warnings can be avoided if you declare as
  337.           volatile all the functions you use that never return.
  338.  
  339.         * A nonvolatile automatic variable might be changed by  a
  340.  
  341. Version 1.36        Last change: 18 June 1989                   6
  342.  
  343. GCC(1)                    USER COMMANDS                    GCC(1)
  344.  
  345.           call to longjmp(3C).  These warnings as well are possi-
  346.           ble only in optimizing compilation.
  347.  
  348.           The compiler sees only the  calls  to  setjmp(3C).   It
  349.           cannot  know where longjmp(3C) will be called; in fact,
  350.           a signal handler could call it  at  any  point  in  the
  351.           code.   As  a  result,  you may get a warning even when
  352.           there is in fact no problem because longjmp(3C)  cannot
  353.           in  fact  be  called  at  the place which would cause a
  354.           problem.
  355.  
  356.         * A function can return either with or without  a  value.
  357.           (Falling off the end of the function body is considered
  358.           returning without a value.) For example, this  function
  359.           would evoke such a warning:
  360.  
  361.                foo (a)
  362.                {
  363.                  if (a > 0)
  364.                    return a;
  365.                }
  366.  
  367.           Spurious warnings can occur because  GNU  CC  does  not
  368.           realize that certain functions (including abort(3C) and
  369.           longjmp(3C)) will never return.
  370.  
  371.         * An expression-statement contains no side effects.
  372.  
  373.           In the  future,  other  useful  warnings  may  also  be
  374.           enabled by this option.
  375.  
  376.      -Wimplicit
  377.           Warn whenever a function is implicitly declared.
  378.  
  379.      -Wreturn-type
  380.           Warn whenever a function is defined with a  return-type
  381.           that  defaults  to  int.   Also  warn  about any return
  382.           statement with no  return-value  in  a  function  whose
  383.           return-type is not void.
  384.  
  385.      -Wunused
  386.           Warn whenever a local variable is unused aside from its
  387.           declaration, and whenever a function is declared static
  388.           but never defined.
  389.  
  390.      -Wswitch
  391.           Warn whenever  a  switch  statement  has  an  index  of
  392.           enumeral  type  and lacks a case for one or more of the
  393.           named codes of that enumeration.  (The  presence  of  a
  394.           default  label prevents this warning.) case labels out-
  395.           side the enumeration range also provoke  warnings  when
  396.           this option is used.
  397.  
  398. Version 1.36        Last change: 18 June 1989                   7
  399.  
  400. GCC(1)                    USER COMMANDS                    GCC(1)
  401.  
  402.      -Wcomment
  403.           Warn whenever a comment-start sequence /* appears in  a
  404.           comment.
  405.  
  406.      -Wtrigraphs
  407.           Warn if any trigraphs are  encountered  (assuming  they
  408.           are enabled).
  409.  
  410.      -Wall
  411.           All of the above -W options combined.   These  are  all
  412.           the  options  which  pertain  to  usage  that we do not
  413.           recommend and that we believe is always easy to  avoid,
  414.           even in conjunction with macros.
  415.  
  416.           The other -W...  options below are not implied by -Wall
  417.           because  certain  kinds  of  useful  macros  are almost
  418.           impossible to write without causing those warnings.
  419.  
  420.      -Wshadow
  421.           Warn whenever a local variable  shadows  another  local
  422.           variable.
  423.  
  424.      -Wid-clash-len
  425.           Warn whenever two distinct  identifiers  match  in  the
  426.           first len characters.  This may help you prepare a pro-
  427.           gram that will compile with  certain  obsolete,  brain-
  428.           damaged compilers.
  429.  
  430.      -Wpointer-arith
  431.           Warn about anything that depends on the size of a func-
  432.           tion type or of void.  GNU C assigns these types a size
  433.           of 1, for  convenience  in  calculations  with  void  *
  434.           pointers and pointers to functions.
  435.  
  436.      -Wcast-qual
  437.           Warn whenever a pointer is cast so as to remove a  type
  438.           qualifier from the target type.  For example, warn if a
  439.           const char * is cast to an ordinary char *.
  440.  
  441.      -Wwrite-strings
  442.           Give string constants the type  const  char[length]  so
  443.           that copying the address of one into a non-const char *
  444.           pointer will get a warning.  These warnings  will  help
  445.           you  find  at  compile  time code that can try to write
  446.           into a string constant, but only if you have been  very
  447.           careful  about  using  const in declarations and proto-
  448.           types.  Otherwise, it will just be a nuisance; this  is
  449.           why we did not make -Wall request these warnings.
  450.  
  451.      -p   Generate extra code to write profile information  suit-
  452.           able for the analysis program prof(1).
  453.  
  454. Version 1.36        Last change: 18 June 1989                   8
  455.  
  456. GCC(1)                    USER COMMANDS                    GCC(1)
  457.  
  458.      -pg  Generate extra code to write profile information  suit-
  459.           able for the analysis program gprof(1).
  460.  
  461.      -a   Generate extra code to write  profile  information  for
  462.           basic   blocks,   suitable  for  the  analysis  program
  463.           tcov(1).  Eventually GNU gprof(1) should be extended to
  464.           process this data.
  465.  
  466.      -llibrary
  467.           Search a standard list of  directories  for  a  library
  468.           named   library,   which   is  actually  a  file  named
  469.           liblibrary.a.  The linker uses this file as if  it  had
  470.           been specified precisely by name.
  471.  
  472.           The directories searched include several standard  sys-
  473.           tem directories plus any that you specify with -L.
  474.  
  475.           Normally the files found this way are  library  files--
  476.           archive  files  whose  members  are  object files.  The
  477.           linker handles an archive file by scanning  through  it
  478.           for  members which define symbols that have so far been
  479.           referenced but not defined.  But if the  file  that  is
  480.           found  is  an ordinary object file, it is linked in the
  481.           usual fashion.  The only difference between using an -l
  482.           option  and  specifying a file name is that -l searches
  483.           several directories.
  484.  
  485.      -Ldir
  486.           Add directory dir to the  list  of  directories  to  be
  487.           searched for -l.
  488.  
  489.      -nostdlib
  490.           Don't use the standard  system  libraries  and  startup
  491.           files  when  linking.  Only the files you specify (plus
  492.           gnulib) will be passed to the linker.
  493.  
  494.      -mmachinespec
  495.           Machine-dependent option specifying something about the
  496.           type  of  target machine.  These options are defined by
  497.           the macro TARGET_SWITCHES in the  machine  description.
  498.           The  default  for  the  options is also defined by that
  499.           macro, which enables you to change the defaults.
  500.  
  501.           These are the -m options defined in the  68000  machine
  502.           description:
  503.  
  504.           -m68020
  505.           -mc68020
  506.                Generate output for a 68020 (rather than a 68000).
  507.                This  is  the  default  if  you use the unmodified
  508.                sources.
  509.  
  510. Version 1.36        Last change: 18 June 1989                   9
  511.  
  512. GCC(1)                    USER COMMANDS                    GCC(1)
  513.  
  514.           -m68000
  515.           -mc68000
  516.                Generate output for a 68000 (rather than a 68020).
  517.  
  518.           -m68881
  519.                Generate output containing 68881 instructions  for
  520.                floating  point.   This  is the default if you use
  521.                the unmodified sources.
  522.  
  523.           -mfpa
  524.                Generate output containing  Sun  FPA  instructions
  525.                for floating point.
  526.  
  527.           -msoft-float
  528.                Generate  output  containing  library  calls   for
  529.                floating point.
  530.  
  531.           -mshort
  532.                Consider type int to be 16 bits wide,  like  short
  533.                int.
  534.  
  535.           -mnobitfield
  536.                Do not use the  bit-field  instructions.   -m68000
  537.                implies -mnobitfield.
  538.  
  539.           -mbitfield
  540.                Do  use  the  bit-field   instructions.    -m68020
  541.                implies  -mbitfield.   This  is the default if you
  542.                use the unmodified sources.
  543.  
  544.           -mrtd
  545.                Use a different  function-calling  convention,  in
  546.                which  functions that take a fixed number of argu-
  547.                ments return with the rtd instruction, which  pops
  548.                their  arguments  while returning.  This saves one
  549.                instruction in the caller since there is  no  need
  550.                to pop the arguments there.
  551.  
  552.                This calling convention is incompatible  with  the
  553.                one normally used on Unix, so you cannot use it if
  554.                you need to call libraries compiled with the  Unix
  555.                compiler.
  556.  
  557.                Also, you must provide function prototypes for all
  558.                functions  that take variable numbers of arguments
  559.                (including printf(3S)); otherwise  incorrect  code
  560.                will be generated for calls to those functions.
  561.  
  562.                In addition, seriously incorrect code will  result
  563.                if  you  call  a function with too many arguments.
  564.                (Normally,   extra   arguments   are    harmlessly
  565.                ignored.)
  566.  
  567. Version 1.36        Last change: 18 June 1989                  10
  568.  
  569. GCC(1)                    USER COMMANDS                    GCC(1)
  570.  
  571.                The rtd instruction is supported by the 68010  and
  572.                68020 processors, but not by the 68000.
  573.  
  574.           These  -m  options  are  defined  in  the  Vax  machine
  575.           description:
  576.  
  577.           -munix
  578.                Do not output certain  jump  instructions  (aobleq
  579.                and  so  on)  that  the Unix assembler for the Vax
  580.                cannot handle across long ranges.
  581.  
  582.           -mgnu
  583.                Do output those jump instructions, on the  assump-
  584.                tion  that  you  will assemble with the GNU assem-
  585.                bler.
  586.  
  587.           -mg
  588.                Output code for g-format  floating  point  numbers
  589.                instead of d-format.
  590.  
  591.           These -m switches are supported on the Sparc:
  592.  
  593.           -mfpu
  594.                Generate output containing floating point instruc-
  595.                tions.  This is the default if you use the unmodi-
  596.                fied sources.
  597.  
  598.           -msoft-float
  599.                Generate  output  containing  library  calls   for
  600.                floating point.
  601.  
  602.           -mno-epilogue
  603.                Generate separate return instructions  for  return
  604.                statements.   This  has both advantages and disad-
  605.                vantages; I don't recall what they are.
  606.  
  607.           These -m options are  defined  in  the  Convex  machine
  608.           description:
  609.  
  610.           -mc1
  611.                Generate output for a C1.   This  is  the  default
  612.                when the compiler is configured for a C1.
  613.  
  614.           -mc2
  615.                Generate output for a C2.   This  is  the  default
  616.                when the compiler is configured for a C2.
  617.  
  618.           -margcount
  619.                Generate code which puts an argument count in  the
  620.                word  preceding each argument list.  Some nonport-
  621.                able Convex  and  Vax  programs  need  this  word.
  622.                (Debuggers  don't;  this  info  is  in  the symbol
  623.  
  624. Version 1.36        Last change: 18 June 1989                  11
  625.  
  626. GCC(1)                    USER COMMANDS                    GCC(1)
  627.  
  628.                table.)
  629.  
  630.           -mnoargcount
  631.                Omit the argument count word.  This is the default
  632.                if you use the unmodified sources.
  633.  
  634.      -fflag
  635.           Specify machine-independent  flags.   Most  flags  have
  636.           both  positive and negative forms; the negative form of
  637.           -ffoo would be -fno-foo.  In the table below, only  one
  638.           of  the  forms  is  listed--the  one  which  is not the
  639.           default.  You can figure out the other form  by  either
  640.           removing no- or adding it.
  641.  
  642.      -fpcc-struct-return
  643.           Use the same convention for returning struct and  union
  644.           values  that  is  used  by the usual C compiler on your
  645.           system.  This convention is less  efficient  for  small
  646.           structures,  and  on many machines it fails to be reen-
  647.           trant; but it has the advantage of allowing intercalla-
  648.           bility between GCC-compiled code and PCC-compiled code.
  649.  
  650.      -ffloat-store
  651.           Do not store  floating-point  variables  in  registers.
  652.           This  prevents undesirable excess precision on machines
  653.           such as the 68000 where the floating registers (of  the
  654.           68881) keep more precision than a double is supposed to
  655.           have.
  656.  
  657.           For most programs, the excess precision does only good,
  658.           but  a  few  programs rely on the precise definition of
  659.           IEEE floating point.  Use -ffloat-store for  such  pro-
  660.           grams.
  661.  
  662.      -fno-asm
  663.           Do not recognize asm, inline or typeof  as  a  keyword.
  664.           These  words  may then be used as identifiers.  You can
  665.           use __asm__, __inline__ and __typeof__ instead.
  666.  
  667.      -fno-defer-pop
  668.           Always pop the arguments to each function call as  soon
  669.           as  that function returns.  Normally the compiler (when
  670.           optimizing) lets arguments accumulate on the stack  for
  671.           several function calls and pops them all at once.
  672.  
  673.      -fstrength-reduce
  674.           Perform the optimizations of  loop  strength  reduction
  675.           and elimination of iteration variables.
  676.  
  677.      -fcombine-regs
  678.           Allow the combine pass to combine an  instruction  that
  679.           copies  one register into another.  This might or might
  680.  
  681. Version 1.36        Last change: 18 June 1989                  12
  682.  
  683. GCC(1)                    USER COMMANDS                    GCC(1)
  684.  
  685.           not produce better code when used in addition to -O.  I
  686.           am  interested  in  hearing  about  the difference this
  687.           makes.
  688.  
  689.      -fforce-mem
  690.           Force memory  operands  to  be  copied  into  registers
  691.           before  doing  arithmetic  on  them.   This may produce
  692.           better code by making all memory  references  potential
  693.           common subexpressions.  When they are not common subex-
  694.           pressions, instruction combination should eliminate the
  695.           separate  register-load.   I  am  interested in hearing
  696.           about the difference this makes.
  697.  
  698.      -fforce-addr
  699.           Force memory address constants to be copied into regis-
  700.           ters before doing arithmetic on them.  This may produce
  701.           better code just as -fforce-mem may.  I  am  interested
  702.           in hearing about the difference this makes.
  703.  
  704.      -fomit-frame-pointer
  705.           Don't keep the frame pointer in a  register  for  func-
  706.           tions  that  don't  need one.  This avoids the instruc-
  707.           tions to save, set up and restore  frame  pointers;  it
  708.           also  makes  an  extra register available in many func-
  709.           tions.  It also makes debugging impossible.
  710.  
  711.           On some machines, such as the Vax,  this  flag  has  no
  712.           effect, because the standard calling sequence automati-
  713.           cally handles the frame pointer and nothing is saved by
  714.           pretending  it  doesn't exist.  The machine-description
  715.           macro FRAME_POINTER_REQUIRED controls whether a  target
  716.           machine supports this flag.
  717.  
  718.      -finline-functions
  719.           Integrate all simple functions into their callers.  The
  720.           compiler heuristically decides which functions are sim-
  721.           ple enough to be worth integrating in this way.
  722.  
  723.           If all calls to a given function  are  integrated,  and
  724.           the  function  is declared static, then the function is
  725.           normally not output as assembler code in its own right.
  726.  
  727.      -fcaller-saves
  728.           Enable values to be allocated in registers that will be
  729.           clobbered by function calls, by emitting extra instruc-
  730.           tions to save and restore  the  registers  around  such
  731.           calls.   Such  allocation is done only when it seems to
  732.           result in better code than would otherwise be produced.
  733.  
  734.           This option is enabled by default on certain  machines,
  735.           usually those which have no call-preserved registers to
  736.           use instead.
  737.  
  738. Version 1.36        Last change: 18 June 1989                  13
  739.  
  740. GCC(1)                    USER COMMANDS                    GCC(1)
  741.  
  742.      -fkeep-inline-functions
  743.           Even if all calls to a given function  are  integrated,
  744.           and  the function is declared static, nevertheless out-
  745.           put a separate run-time callable version of  the  func-
  746.           tion.
  747.  
  748.      -fwritable-strings
  749.           Store string constants in the writable data segment and
  750.           don't  uniquize  them.   This is for compatibility with
  751.           old programs which assume they can  write  into  string
  752.           constants.  Writing into string constants is a very bad
  753.           idea; constants should be constant.
  754.  
  755.      -fcond-mismatch
  756.           Allow conditional expressions with mismatched types  in
  757.           the  second  and third arguments.  The value of such an
  758.           expression is void.
  759.  
  760.      -fno-function-cse
  761.           Do not put function addresses in registers;  make  each
  762.           instruction  that calls a constant function contain the
  763.           function's address explicitly.
  764.  
  765.           This option results in less efficient  code,  but  some
  766.           strange  hacks  that  alter the assembler output may be
  767.           confused  by  the  optimizations  performed  when  this
  768.           option is not used.
  769.  
  770.      -fvolatile
  771.           Consider all memory references through pointers  to  be
  772.           volatile.
  773.  
  774.      -fshared-data
  775.           Requests that the data and non-const variables of  this
  776.           compilation  be  shared  data rather than private data.
  777.           The distinction makes sense only on  certain  operating
  778.           systems,  where shared data is shared between processes
  779.           running the same program, while private data exists  in
  780.           one copy per process.
  781.  
  782.      -funsigned-char
  783.           Let the type char be the unsigned, like unsigned char.
  784.  
  785.           Each kind of machine has a default for what char should
  786.           be.  It is either like unsigned char by default or like
  787.           signed char by default.   (Actually,  at  present,  the
  788.           default is always signed.)
  789.  
  790.           The type char is always a  distinct  type  from  either
  791.           signed  char or unsigned char, even though its behavior
  792.           is always just like one of those two.
  793.  
  794. Version 1.36        Last change: 18 June 1989                  14
  795.  
  796. GCC(1)                    USER COMMANDS                    GCC(1)
  797.  
  798.           Note that this is equivalent to -fno-signed-char, which
  799.           is the negative form of -fsigned-char.
  800.  
  801.      -fsigned-char
  802.           Let the type char be signed, like signed char.
  803.  
  804.           Note that this  is  equivalent  to  -fno-unsigned-char,
  805.           which is the negative form of -funsigned-char.
  806.  
  807.      -fdelayed-branch
  808.           If supported for the target machine, attempt to reorder
  809.           instructions  to  exploit  instruction  slots available
  810.           after delayed branch instructions.
  811.  
  812.      -ffixed-reg
  813.           Treat the register named reg as a fixed register;  gen-
  814.           erated code should never refer to it (except perhaps as
  815.           a stack pointer, frame pointer or in some  other  fixed
  816.           role).
  817.  
  818.           reg must be the name of a register.  The register names
  819.           accepted  are  machine-specific  and are defined in the
  820.           REGISTER_NAMES macro in the machine  description  macro
  821.           file.
  822.  
  823.           This flag does not have a  negative  form,  because  it
  824.           specifies a three-way choice.
  825.  
  826.      -fcall-used-reg
  827.           Treat the register named reg as an allocatable register
  828.           that  is  clobbered by function calls.  It may be allo-
  829.           cated for temporaries or variables  that  do  not  live
  830.           across  a  call.   Functions compiled this way will not
  831.           save and restore the register REG.
  832.  
  833.           Use of this flag for a register that has a  fixed  per-
  834.           vasive  role  in the machine's execution model, such as
  835.           the stack pointer or frame pointer, will produce disas-
  836.           trous results.
  837.  
  838.           This flag does not have a  negative  form,  because  it
  839.           specifies a three-way choice.
  840.  
  841.      -fcall-saved-reg
  842.           Treat the register named reg as an allocatable register
  843.           saved  by functions.  It may be allocated even for tem-
  844.           poraries or variables that live across a  call.   Func-
  845.           tions  compiled  this  way  will  save  and restore the
  846.           register reg if they use it.
  847.  
  848.           Use of this flag for a register that has a  fixed  per-
  849.           vasive  role  in the machine's execution model, such as
  850.  
  851. Version 1.36        Last change: 18 June 1989                  15
  852.  
  853. GCC(1)                    USER COMMANDS                    GCC(1)
  854.  
  855.           the stack pointer or frame pointer, will produce disas-
  856.           trous results.
  857.  
  858.           A different sort of disaster will result from  the  use
  859.           of  this  flag  for a register in which function values
  860.           may be returned.
  861.  
  862.           This flag does not have a  negative  form,  because  it
  863.           specifies a three-way choice.
  864.  
  865.      -dletters
  866.           Says to make debugging  dumps  at  times  specified  by
  867.           letters.  Here are the possible letters:
  868.  
  869.           r
  870.                Dump after RTL generation.
  871.           j
  872.                Dump after first jump optimization.
  873.           J
  874.                Dump after last jump optimization.
  875.           s
  876.                Dump after CSE (including  the  jump  optimization
  877.                that sometimes follows CSE).
  878.           L
  879.                Dump after loop optimization.
  880.           f
  881.                Dump after flow analysis.
  882.           c
  883.                Dump after instruction combination.
  884.           l
  885.                Dump after local register allocation.
  886.           g
  887.                Dump after global register allocation.
  888.           d
  889.                Dump after delayed branch scheduling.
  890.           m
  891.                Print statistics on memory usage, at  the  end  of
  892.                the run.
  893.  
  894.      -pedantic
  895.           Issue all the warnings demanded by strict ANSI standard
  896.           C; reject all programs that use forbidden extensions.
  897.  
  898.           Valid ANSI standard C programs should compile  properly
  899.           with  or  without  this  option (though a rare few will
  900.           require -ansi).  However, without this option,  certain
  901.           GNU extensions and traditional C features are supported
  902.           as well.  With this option, they are  rejected.   There
  903.           is  no  reason  to  use  this option; it exists only to
  904.           satisfy pedants.
  905.  
  906.           -pedantic does not cause warning messages  for  use  of
  907.  
  908. Version 1.36        Last change: 18 June 1989                  16
  909.  
  910. GCC(1)                    USER COMMANDS                    GCC(1)
  911.  
  912.           the  alternate  keywords whose names begin and end with
  913.           __.
  914.  
  915.      -static
  916.           On Suns running version 4, this prevents  linking  with
  917.           the  shared libraries.  (-g has the same effect.) These
  918.           options control the C preprocessor,  which  is  run  on
  919.           each  C  source file before actual compilation.  If you
  920.           use the `-E' option, nothing is done except  C  prepro-
  921.           cessing.    Some  of  these  options  make  sense  only
  922.           together with `-E' because  they  request  preprocessor
  923.           output that is not suitable for actual compilation.
  924.  
  925.      -C   Tell the preprocessor not to  discard  comments.   Used
  926.           with the -E option.
  927.  
  928.      -Idir
  929.           Search directory dir for include files.
  930.  
  931.      -I-  Any directories specified with -I  options  before  the
  932.           -I-  option  are searched only for the case of #include
  933.           "file"; they are not searched for #include <file>.
  934.  
  935.           If additional directories are specified with -I options
  936.           after  the  -I-, these directories are searched for all
  937.           #include directives.  (Ordinarily  all  -I  directories
  938.           are used this way.)
  939.  
  940.           In addition, the -I- option inhibits  the  use  of  the
  941.           current  directory  as  the  first search directory for
  942.           #include "file".  Therefore, the current  directory  is
  943.           searched  only  if it is requested explicitly with -I..
  944.           Specifying both -I- and -I. allows you to control  pre-
  945.           cisely   which  directories  are  searched  before  the
  946.           current one and which are searched after.
  947.  
  948.      -nostdinc
  949.           Do not  search  the  standard  system  directories  for
  950.           header  files.  Only the directories you have specified
  951.           with  -I  options  (and  the  current   directory,   if
  952.           appropriate) are searched.
  953.  
  954.           Between -nostdinc and -I-, you can eliminate all direc-
  955.           tories from the search path except those you specify.
  956.  
  957.      -M   Tell the preprocessor to output  a  rule  suitable  for
  958.           make(1)  describing  the  dependencies  of  each source
  959.           file.  For each source file, the  preprocessor  outputs
  960.           one  make-rule whose target is the object file name for
  961.           that source file and whose  dependencies  are  all  the
  962.           files  #included in it.  This rule may be a single line
  963.           or may be continued with \-newline if it is long.
  964.  
  965. Version 1.36        Last change: 18 June 1989                  17
  966.  
  967. GCC(1)                    USER COMMANDS                    GCC(1)
  968.  
  969.           -M implies -E.
  970.  
  971.      -MM  Like -M but the output mentions  only  the  user-header
  972.           files  included  with  #include  "file".  System header
  973.           files included with #include <file> are omitted.
  974.  
  975.           -MM implies -E.
  976.  
  977.      -Dmacro
  978.           Define macro macro with the empty string as its defini-
  979.           tion.
  980.  
  981.      -Dmacro=defn
  982.           Define macro macro as defn.
  983.  
  984.      -Umacro
  985.           Undefine macro macro.
  986.  
  987.      -trigraphs
  988.           Support ANSI C trigraphs.  You don't want to know about
  989.           this  brain-damage.   The  -ansi  option  also has this
  990.           effect.
  991.  
  992. FILES
  993.      file.c             C source file
  994.      file.s             assembly language file
  995.      file.o             object file
  996.      a.out              link edited output
  997.      /tmp/cc*           temporary files
  998.      LIBDIR/gcc-cpp     preprocessor
  999.      LIBDIR/gcc-cc1     compiler
  1000.      LIBDIR/gcc-gnulib  library needed by GCC on some machines
  1001.      /lib/crt[01n].o    start-up routine
  1002.      /lib/libc.a        standard C library, see intro(3)
  1003.      /usr/include       standard directory for #include files
  1004.      LIBDIR/gcc-include standard gcc directory for #include files
  1005.  
  1006.      LIBDIR is usually /usr/local/lib.
  1007.  
  1008. SEE ALSO
  1009.      as(1), ld(1), adb(1), dbx(1), sdb(1).
  1010.  
  1011. BUGS
  1012.      Bugs should be reported  to  bug-gcc@prep.ai.mit.edu.   Bugs
  1013.      tend  actually to be fixed if they can be isolated, so it is
  1014.      in your interest to report them in such a way that they  can
  1015.      be easily reproduced.
  1016.  
  1017. COPYING
  1018.      Copyright (c) 1988 Free Software Foundation,  Inc.   Permis-
  1019.      sion  is  granted  to make and distribute verbatim copies of
  1020.      this  manual  provided  the  copyright   notice   and   this
  1021.  
  1022. Version 1.36        Last change: 18 June 1989                  18
  1023.  
  1024. GCC(1)                    USER COMMANDS                    GCC(1)
  1025.  
  1026.      permission  notice  are preserved on all copies.  Permission
  1027.      is granted to copy and distribute modified versions of  this
  1028.      manual  under  the conditions for verbatim copying, provided
  1029.      that the entire resulting derived work is distributed  under
  1030.      the  terms  of  a  permission  notice identical to this one.
  1031.      Permission is granted to copy and distribute translations of
  1032.      this  manual  into  another language, under the above condi-
  1033.      tions for modified versions,  except  that  this  permission
  1034.      notice  may be included in translations approved by the Free
  1035.      Software Foundation instead of in the original English.
  1036.  
  1037. AUTHORS
  1038.      See the GNU CC Manual for the contributors to GNU CC.
  1039.  
  1040. Version 1.36        Last change: 18 June 1989                  19
  1041.  
  1042. ------------
  1043. These are all the binaries for Gnu Gcc V1.36 with all the updates until
  1044. 09/28/89 applied  for atariSt TOS
  1045.  
  1046.     *.ttp files go into GNUEXEC
  1047.     *.olb and crt0.o go into GNULIB
  1048.  
  1049. NOTE: now gcc-cpp understands the environment var GNUINC, which is optionally
  1050. the PATH to #include <> files, so you don't necessarily have to have them
  1051. mixed up with the library objects in GNULIB.
  1052.  
  1053. NOTE: gcc-ld.ttp now correctly interprets -lFOO as
  1054.     $(GNULIB)\FOO.olb
  1055.  
  1056.      gcc-as.ttp now correctly skips over \r in files edited on atariSt's
  1057.      gcc-as.ttp now correctly understands and adjusts for data alterable
  1058.             adressing modes when it appears as the second operand
  1059.             of instructions such as `cmp? #const, foo'. (bug fix
  1060.         since the last gcc-1.34 distribution).
  1061.  
  1062.      crt0.o - still needs a wrapper for stderr. it currently uses
  1063.           the MWC convention for long command line args (except
  1064.           that it does not look into the _io_vector part). If and
  1065.           when this issue is resolved in comp.sys.atari.st, we can
  1066.           make the necessary adjustments. Gulam users should set
  1067.           `env_style mw' if you want to give long args lines to gcc.ttp.
  1068.  
  1069.      gcc-cpp - now does __DATE__ and __FILE__ correctly
  1070.  
  1071.      gcc     - now handles -mshort (16 bit integers). if -mshort is supplied
  1072.            the macro __MSHORT__ gets #defined, and the correct libraries
  1073.            ( $(GNULIB)\FOO16.olb ) are linked. Please carefully examine
  1074.            the prototypes in the #include<> headers for types before
  1075.            using -mshort.
  1076.  
  1077.            now handles long args, so do gcc-cpp, gcc-cc1, gcc-ar and
  1078.            gcc-ld.
  1079.            Gcc has also other minor bugs fixed, see the diffs.
  1080.            Also as a concequence of the new library, forward slashes
  1081.            are permitted in lieu of `\'s.
  1082.  
  1083.     gdb          - completely new. thanks very much to john dunning for
  1084.         this fabulous piece of work.
  1085.     sym-ld    needed with gdb. see the gdb docs.
  1086.  
  1087. Also included are new and improved utilities to print and adjust the
  1088. _stksize of any gcc compiled program. Both the utilities now will
  1089. lookup the symbol table (so do not use -s) in an executable to
  1090. find _stksize.
  1091.  
  1092. NOTE that the executables as distributed are set up for a 1M St.
  1093. You will certainly have to use these utils to tailor the programs
  1094. to your environment.
  1095.  
  1096. printstk -- prints the current value of _stksize from an executable.
  1097.     Usage: printstk [<filename>]
  1098.       if <filename> is not specified it defaults to .\gcc-cc1.ttp
  1099.  
  1100. fixstk   -- sets the value of _stksize in an executable.
  1101.     Usage: fixstk <size> [<filename>]
  1102.       size:    specified as # of bytes     nnn    nnn == integer
  1103.         specified as # of Kilo Bytes    nnnK
  1104.         specified as # of Mega Bytes    nnnM
  1105.       filename:
  1106.         optional, defaults to \.gcc-cc1.ttp
  1107.  
  1108. For TOS 1.4 (developers prom version or better) a toglclr is included
  1109. that toggles the clear above BSS to end of TPA flag for the gemdos
  1110. loader.
  1111.  
  1112. send your comments to:
  1113. --
  1114. bang:   {any internet host}!dsrgsun.ces.CWRU.edu!bammi    jwahar r. bammi
  1115. domain: bammi@dsrgsun.ces.CWRU.edu
  1116. GEnie:    J.Bammi
  1117. ----------------------------
  1118. #
  1119. # Sample Gulam script
  1120. # set up commands for gcc and gas
  1121. #
  1122. alias cpp e:\exec\gcc-cpp
  1123. setenv cpp e:\exec\gcc-cpp.ttp
  1124. alias cc1 e:\exec\gcc-cc1
  1125. setenv cc1 e:\exec\gcc-cc1.ttp
  1126. alias gas e:\exec\gcc-as
  1127. setenv gas e:\exec\gcc-as.ttp
  1128. alias as e:\exec\gcc-as
  1129. setenv as e:\exec\gcc-as.ttp
  1130. alias link e:\exec\link
  1131. setenv link e:\exec\link.ttp
  1132. alias ar e:\exec\gcc-ar
  1133. setenv ar e:\exec\gcc-ar.ttp
  1134. alias ld e:\exec\gcc-ld
  1135. setenv ld e:\exec\gcc-ld.ttp
  1136. alias gcc e:\exec\gcc
  1137. setenv gcc e:\exec\gcc.ttp
  1138. #
  1139. alias cc e:\exec\gcc
  1140. setenv cc e:\exec\gcc.ttp
  1141. alias xcc e:\exec\gcc -Be:\exec\x
  1142. setenv xcc e:\exec\gcc.ttp -Be:\exec\x
  1143. #
  1144. alias make e:\util\xmake.ttp
  1145. setenv make e:\util\xmake.ttp
  1146. #
  1147. # bison...
  1148. #
  1149. alias bison e:\bison\bison.ttp
  1150. setenv bison e:\bison\bison.ttp
  1151. setenv BISON_SIMPLE e:\bison\bison.sim
  1152. setenv BISON_HAIRY e:\bison\bison.hai
  1153. #
  1154. # nm: this nm can only applies to .o and library (.old or .a) files
  1155. # It cannot nm an atari-tos executable
  1156. #
  1157. alias nm e:\util\nm.ttp
  1158. #
  1159. # Flex
  1160. #
  1161. alias flex e:\flex\flex.ttp
  1162. setenv flex e:\flex\flex.ttp
  1163. setenv FLEX_DEF e:\flex\flexdef.skl
  1164. setenv FLEX_FAST e:\flex\flexfast.skl
  1165. #
  1166. # General
  1167. #
  1168. setenv GNULIB e:\lib
  1169. setenv GCCEXEC e:\exec\gcc-
  1170. setenv TEMP h:
  1171. ------------------------------------
  1172. Recent additions: (gcc v1.35 release and later)
  1173.  
  1174.     PLEASE carefully read the file `Changelog' for details
  1175.  
  1176. Here is a very incomplete list of changes, see `Changelog' for details.
  1177.  
  1178.     - BSD curses library port added
  1179.     - curses widget lib added.
  1180.     - new functions vfork, wait.
  1181.     - system() now does i/o re-direction
  1182.     - new functions stty, gtty
  1183.     - new function tzset
  1184.     - new function console_set_key and new include file
  1185.       keymap.h (see Changelog).
  1186.     -filename mapping now more flexible. a new function
  1187.      that allows user settable filename mapping. (see Changelog)
  1188.     - malloc chunk size now user settable. (see Changelog)
  1189.     - stat, access, bcopy, qsort completely replaced.
  1190.     - scanf overhauled for floats. it was broken.
  1191.     - all pml tests pass now
  1192.     - HUGE defined properly in atof and math.h (aka pmluser.h)
  1193.     - added extern size_t  __DEFAULT_BUFSIZ__
  1194.     it is by default set to BUFSIZ but at any point you can assign to
  1195.     it, and from then onwards all fopen's will use that size for
  1196.     buffering. NOTE: makeing __DEFAULT_BUFSIZ__ == 0 will result
  1197.     in unpredictable behavior. If you want unbuffered streams use
  1198.     other means (like setbuf etc).
  1199.     - added _malloczero(int truth)
  1200.     by calling _malloczero(1) all subsequent malloc's will zero
  1201.     fill memory before returning (very useful with the toglclr util and
  1202.     tos 1.4 or later).
  1203.     - many of the lXXX functions are now just globl labels at the head of
  1204.     appro. functions (when applicable). Note: this may have to
  1205.     change is the behaviour of asm() changes.
  1206.     - added berzerkly'ish sys/dir.h
  1207.     - lseek now supports BSD file extension semantics
  1208.     - line buffered (output) streams now work correctly
  1209.     - bug in dflonum.c corrected
  1210.     - bug fixes in osbind.h
  1211.     - lots of code cleanup.
  1212.     - some stuff dynamisized.
  1213.     - atexit fixed
  1214.     - printf now handles `#' flag
  1215.     - setjmp fixed. it did'nt work at all.
  1216.     - stat fixed for . and ..  (Tos 1.4 still seems to have this bug)
  1217.  
  1218.     -following files from the first distribution of this lib (with gcc
  1219.     V1.35) moved to sub-dir `notused/'
  1220.         bcopy.c
  1221.         index.c
  1222.         lbcmp.c
  1223.         lbcopy.c
  1224.         lbzero.c
  1225.         qsort.c
  1226.         remove.c
  1227.         rindex.c
  1228.         fpprint.c
  1229.         sldexp.c
  1230.         printf.c
  1231.         prtfld.c
  1232.         sldexp.c
  1233.  
  1234.     - setlinebuf added
  1235.     - atof, ldexp, frexp, modf etc re-wroked
  1236.     - all formatted print routines re-worked
  1237.     - pml lib passes all tests now
  1238.     - lots of other bug fixes
  1239.  
  1240. ----------------------------------------------------------------------------
  1241.  
  1242. Here's a new library for the TOS version of the GCC. You need at least
  1243. need GCC 1.31 to use it; if your version of the GCC is less than 1.33 you
  1244. will need to tweak a few things.
  1245.  
  1246.             ACKNOWLEDGEMENTS:
  1247.  
  1248.     Eric Smith (7103_300%uwovax.uwo.ca@CORNELLC.CIT.CORNELL.EDU, please
  1249. put attn `Eric Smith' as this is a shared mbox) put this library together and
  1250. contributed a lot of code, and put a lot of effort in debugging it. The
  1251. library in its current form is due to his efforts.
  1252.  
  1253. The original TOS GCC library that came with GCC 1.25, much of which was
  1254. written by or revamped by John R. Dunning (jrd@STONY-BROOK.SCRC.Symbolics.COM),
  1255. provided many of the low level routines. Of course we are also very greatful
  1256. to jrd for his origonal port of gnu.
  1257.  
  1258. Most of the standard i/o library came from Dale Schumacher's dLibs version
  1259. 1.2.
  1260.  
  1261. The string handling stuff is from Henry Spencer.
  1262.  
  1263. Last but not the least, i would like to thank all the users who have sent
  1264. in comments / suggestions.
  1265.  
  1266.             Thanks one and all!
  1267.  
  1268. We have re-organized/hacked the code of others above, and are responsible
  1269. for the new bugs. please report them!
  1270.  
  1271. ENHANCEMENTS:
  1272.  
  1273. Ansi compatibility (i would estimate we are about 90% there).
  1274.  
  1275. A lot of new functions.
  1276.  
  1277. Prototypes for everything. I have personally become a believer in them after
  1278. being a disbeliever. It does help catch some pretty subtle errors (even if
  1279. you are using 32 bit ints).
  1280.  
  1281. Some new functionality for old functions, including:
  1282.  
  1283. New stream I/O functions; fgetc(), fputc(), etc. all do newline translation
  1284. by default. Appending "b" to the mode argument of fopen() will disable this
  1285. translation. printf() and scanf() accept more options. printf with e and g
  1286. floating point formats is sort of working (this could stand repairs!!)
  1287.  
  1288. For compatibility to the old TOS gcc library, calling the function
  1289.         _binmode(1);
  1290. at the top of main() will make binary mode the default mode
  1291. for stream i/o (std in/out/err will do the correct cr mapping as before),
  1292. and the i/o functions will behave pretty much like before.
  1293.  
  1294. There is an extern size_t  __DEFAULT_BUFSIZ__ that is normally set to BUFSIZ,
  1295. but you can override it at any point, and get default buffers of that size
  1296. for buffered i/o (a cheap way to have large buffers, instead of
  1297. putting setvbuf()'s all over the place, but its ansi non-compatible).
  1298.  
  1299. The time functions all work with unix style times now, to make porting easier.
  1300. localtime() etc now look up the env. variable `TZ' and calculate the local
  1301. time correctly, taking into account DST etc.
  1302.  
  1303. Functions which work with files accept unix-style path names (with '/' as
  1304. a directory separator) as well as tos-style ones (with '\' between 
  1305. directories).
  1306.  
  1307. Process spawn functions handle long args using MWC conventions. If and when
  1308. the discussion on the net culminates, we can adapt. gulam users may want
  1309. to set their `env_style mw'. New spawn functions present.
  1310.  
  1311. Library setup for to generate both a 16 bit int library (-mshort compatible)
  1312. or a 32 bit int library (See the files CMakefile.16, CMakefile.32 for the
  1313. cross-compiler, and  makefile.16, makefile.32 for the native ST compiler)
  1314.  
  1315. Posix compatible directory access functions (thanks Doug Gwyn and Eric Smith).
  1316.  
  1317. osbind.h is now more or less complete. it is setup to generate inline traps
  1318. by default. This can be overridden by `-D__NO_INLINE__' at compile time
  1319. (see files straps.cpp for the 16 bit defn, and traps.c for the 32 bit
  1320. definitions of __NO_INLINE__ gemdos, xbios and bios traps).
  1321. For use with GDB, MUST use __NO_INLINE__
  1322.  
  1323. lineA.h is setup in a similar manner (i am not including it in this
  1324. distribution as it is a little buggy, will let you have it in a few days
  1325. once i have had a chance to clean it up a bit).
  1326.  
  1327. Lots of brand new fuctionality. Docs are in the works.
  1328.  
  1329. complete reorganization/revaming of #include <> files, please take a moment to
  1330. become familiar with them. Most of the origonal TOS gcc .h files are
  1331. there in the same place, so you should not have much trouble when compiling
  1332. existing code.
  1333.  
  1334. and lots more! please browse though the header files in ../t-include
  1335.  
  1336. POSSIBLE GOTCHAS:
  1337.  
  1338.     USE PROTOTYPES TO STAY OUT OF TROUBLE !!!!!!!!!!!!!!!!!!!!!!!
  1339. (new utility by eric smith `mkproto' provided for this purpose, so the
  1340.  traditional excuses are not applicable :-)
  1341.  
  1342. Here is a new addition for the hackers dictionary
  1343.     UTFP    -- Use The F***ing Prototypes    -:)  -:)
  1344.  
  1345. Especially when using -mshort be aware that
  1346.     the TYPE of SIZE_T is UNSIGNED LONG
  1347.         the SIZEOF operator returns a result of the type UNSIGNED LONG
  1348.     NULL is not a 16 bit integer
  1349.     string functions DO NOT restrict you to int sized strings
  1350.  
  1351. The above choices are both (almost) mandated (see the ansi draft) and
  1352. deliberate. We were not about to restrict data structures to 64k max sizes
  1353. when using -mshort (this would be criminal on the 68k architecture,
  1354. also see the file obstacks.h for another very good reason)
  1355.  
  1356. In short (pun intended) please look over and use prototypes and supplied
  1357. header files!
  1358.  
  1359. NOT HAPPY ABOUT:
  1360.     other than some algorithms that can and will be revamed, we are a
  1361. little unhappy about the static data size of the library. we are working
  1362. on cutting this down, and also on dynamicizing more fixed sized structures in
  1363. the library. Some of the local arrays will also be probably converted to
  1364. alloca's of dynamically determined appro. sizes.
  1365.  
  1366. BUGS:
  1367.  
  1368. No doubt lots of these. Especially look out for places labelled FIXME:
  1369. these are known to be broken or substandard.
  1370.  
  1371. Please send your comments/suggestions/contributions/bug reports
  1372. to both/either/or
  1373.                     enjoy,
  1374. --
  1375. Eric R. Smith                 jwahar r. bammi
  1376. 7103_300@uwovax.uwo.ca            bammi@dsrgsun.ces.cwru.edu
  1377. 7103_300@uwovax.bitnet            {decvax,sun}!cwjcc!dsrgsun!bammi
  1378. (a shared mailbox: put his name on    GEnie: J.Bammi
  1379. the message, please!)
  1380.  
  1381. ---------------------
  1382. previous change history muddled at best (i can track things in my
  1383. RCS files, but i did'nt keep a log).
  1384.  
  1385. changes since first  release of library with TOS gcc v1.35
  1386. in cronologically increasing order:
  1387.  
  1388. ChangeLog:: ++jrb
  1389.     New file.
  1390.  
  1391. all makefiles:: ++jrb
  1392.     adjusted, CMakefile.* now add -fstrength-reduce to CFLAGS
  1393.  
  1394. bcopy.s:: ++jrb
  1395.     replaces bcopy.c -- a better mouse trap :-)
  1396.     bcopy.s has lbcopy() entry point too.
  1397.     bcopy.c moved to notused/
  1398.  
  1399. bcmp.c, bzero.c:: ++jrb
  1400.     added lbXX() entry points
  1401.     this makes lbcmp.c & lbzero.c redundant moved to notused/
  1402.  
  1403. strchr,strrchr:: ++jrb
  1404.     now have entry points for index()/rindex()
  1405.     index.c & rindex.c moved to notused/
  1406.  
  1407. unlink.c:: ++jrb
  1408.     now has entry point for remove()
  1409.     remove.c moved to notused/
  1410.  
  1411. atof.c:: ++jrb
  1412.     redefined HUGE (to be ieee inf)
  1413.     HUGE defined in this way in <pmluser.h> (aka <math.h>) too now.
  1414.  
  1415. ctime.c:: ++jrb
  1416.     cleaned up some ^M's in there
  1417.  
  1418. dflonum.c:: ++jrb
  1419.     bug fix: defn of XXADDL was wrong (when -O, there were not
  1420.     enough constraints to let gcc know that the `zero' pointer
  1421.     was being decremented, so that it would re-load (XXADDL is used
  1422.     in a loop, this made it worse, since it just assumed it was
  1423.     constant and moved the init out of the loop).
  1424.     lot of constraints cleanup here and in flonum.h
  1425.     redundant defined commented out.
  1426.  
  1427.  
  1428. dirent.c:: ++jrb
  1429.     moved mydat, olddta into opendir()
  1430.     cleanups (i am trying to put explicit casts for mallocs etc
  1431.     for the sake of compilers that dont understand protos).
  1432.  
  1433. __DEFAULT_BUFSIZ__ :: ++jrb
  1434.     added an extern size_t  __DEFAULT_BUFSIZ__ that is normally set
  1435.     to BUFSIZ, but you can override it at any point, and get default
  1436.     buffers of that size for buffered i/o (a cheap way to have large
  1437.     buffers, instead of putting setvbuf()'s all over the place, 
  1438.     but its ansi non-compatible).
  1439.     changes in fxxx.c files refplect this addition.
  1440.  
  1441. fputc.c:: ++jrb
  1442.     put in support for line buffered streams
  1443.     in main.c, stdout is now initialized line buffered
  1444.     in stdio.h _IOLBF was not unique, changed that.
  1445.  
  1446. getlogin.c:: ++jrb
  1447.     logname is now dynamically allocated
  1448.     the length is no longer static (used alloca)
  1449.  
  1450. getpw.c:: ++jrb
  1451.     file always open in text mode should _binmode(1) be in effect
  1452.  
  1453. lseek.c:: ++jrb
  1454.     now incorporates BSD semantics too, where if you seek past
  1455.     eof you get a zero filled hole.
  1456.  
  1457. ltoa.c:: ++jrb
  1458.     added strrev proto ifdef __STRICT_ANSI__
  1459.     (string.h has the ifdef to make it kosher)
  1460.  
  1461. main:: ++jrb
  1462.     dynamisized _at_exit []
  1463.     this gets rid of ATEXIT_MAX (ansi says should be at least 32,
  1464.     hopefully we'll meet that and more)
  1465.     the return type of atexit() was opposite -- adjusted
  1466.     this also required adjustment in tmpfile.c
  1467.     stdout is now truely line buffered
  1468.  
  1469. malloc.c:: ++jrb
  1470.     added 
  1471.     _malloczero() that set/unsets flag to tell malloc to zero out blocks
  1472.         useful with TOS 1.4 where TPA clearing above BSS may be
  1473.         turned off. (see new util toglclr.ttp). Some badly
  1474.         written programs (gcc-ar for instance) assume malloc
  1475.         clears.
  1476.     _mallocChunkSize() lets you tune min chunk size. 
  1477.        CAUTION: use _mallocChunkSize() to tailor to your environment,
  1478.             do not make the default too large, as the compiler
  1479.             gets screwed on a 1M machine otherwise (stack/heap clash)
  1480.  
  1481.     added entry points for malloc/realloc etc
  1482.  
  1483. printf.c:: ++jrb
  1484.     added support for `#' flag
  1485.     added `h' flag
  1486.  
  1487. prtfld.c:: ++jrb
  1488.     needed <string.h>
  1489.  
  1490. qsort.c:: ++jrb
  1491.     totally replaced with one from dlib
  1492.     the one from dlibs needed quite a few fixes.
  1493.  
  1494. read.c, write.c:: ++jrb
  1495.     added entry points for read()/write() when not __MSHORT__
  1496.  
  1497. sbrk.c:: ++jrb
  1498.     added entry point for sbrk()
  1499.  
  1500. setjmp.s:: ++jrb
  1501.     was bug ridden (thanks pekka!)
  1502.  
  1503. strcat.c, strncat.c:: ++jrb
  1504.     moved check for null src to outer level
  1505.  
  1506. system.c:: ++jrb
  1507.     cleanups
  1508.  
  1509. tmpfile.c:
  1510.     everything dynamacized
  1511.     the atexit fn delete_tmpfile() now closes before removing
  1512.       this needed new data str.
  1513.  
  1514. tmpnam.c:: ++jrb
  1515.     replaced sprintf with strcpy/strcat
  1516.  
  1517. unx2dos.c:: ++jrb
  1518.     made the file name mapping functions more flex (thanks dale for
  1519.     suggesting the idea). the mapping functions now go through
  1520.     settable (via new function fnmapfunc()) function pointers to
  1521.     call the mapping routines. these pointers are by default
  1522.     initialized to _unx2dos/_dos2unx that were the old functions.
  1523.  
  1524. scanf.c:: ++jrb
  1525.     float conversions (%ef) were severly broken. fixed.
  1526.  
  1527.  
  1528. vfork.c:: ers
  1529. New functions vfork() and wait() added.
  1530.  
  1531. mktemp.c:: ers
  1532. Fixed ranges and handling of multiple "mktemp"'s; because of a typo, the
  1533. old version tried only one number, and if the file existed it gave up.
  1534.  
  1535. localtime.c:: ers
  1536. Added global variable timezone to hold timezone offset; also function
  1537. tzset() to initialize it. (These seem common in Unixes).
  1538. Fixed bug in calculation of timezone offset (EST5EDT was being translated
  1539. as EST5:05EDT).
  1540.  
  1541. system.c:: ers
  1542. Added I/O redirection, using vfork().
  1543.  
  1544. read.c:: ers 
  1545. Fixed some bugs due to evaluation of arguments in macro expansions.
  1546.  
  1547. stat.c:: ers
  1548. Fixed up values returned for st_mode to be consistent with chmod(); also
  1549. added a check for executable files, so most regular files get permissions
  1550. rw-rw-rw- instead of rwxrwxrwx.
  1551. Also added a work around to TOS's refusal to find "." or ".." in an
  1552. Fsfirst without wildcards.
  1553.  
  1554. rename.c:: ers
  1555. Changed so that rename(old, new) fails if "new" already exists. H & S
  1556. claims this is implementation defined, and this way seems more intuitive
  1557. to me. (If a later draft of the pANS changed this, let me know).
  1558.  
  1559. access.c:: ers
  1560. Removed the call to _unx2dos (it wasn't necessary, since stat calls _unx2dos).
  1561.  
  1562. write.c:: ers
  1563. Put def'n of __col_pos here instead of in read.c (to avoid pulling in
  1564. read() unless necessary -- write always gets used).
  1565.  
  1566. sgtty.c:: ers
  1567. New functions stty() and gtty() added for compatibility with old code
  1568. (e.g. curses).
  1569.  
  1570. varargs.h, stdargs.h:: ers
  1571. Added some checks to guard against both of these being included.
  1572.  
  1573. osbind.h:: ers
  1574. Fixed defn for Mshrink.
  1575. Fixed defn of PE_CBASEPAGE.
  1576. Moved defn of struct _dta to here from stat.h.
  1577.  
  1578. types.h:: ers
  1579. Removed #include of <time.h>, added a guarded definition for
  1580. time_t.
  1581.  
  1582. time.h:: ers
  1583. Added a guard to typedef of time_t.
  1584.  
  1585. stat.h:: ers
  1586. Moved defn of struct _dta to osbind.h, where it belongs. Made a "real"
  1587. definition for S_IFREG.
  1588.  
  1589.  
  1590. NEW LIBRARY curses.olb:: ers
  1591. . Combines BSD curses with Fred Fish's PD termcap
  1592. library. Everything seems pretty standard. I made the following
  1593. enhancements:
  1594.  
  1595. If no termcap file can be found, the Atari ST's built in VT52 is assumed.
  1596.  
  1597. A replacement for console_read_byte() is provided that allows binding of
  1598. macros to keys with the call:
  1599.     console_set_key(int scancode, char *r, char *s, char *a)
  1600. where "scancode" is the key scan code, "r" is the string to be sent when
  1601. the key is pressed without any shift keys, "s" the string to be sent when
  1602. SHIFT+key is pressed, and "a" the string to be sent when ALT+key is
  1603. pressed. A NULL string leaves the previous key binding unchanged; an
  1604. empty string "" erases any previous key binding.
  1605. The new console_read_byte() is slower and takes more memory, so it only
  1606. gets linked if -lcurses (or -lcurses16) is used and there is a call to
  1607. console_set_key().
  1608.  
  1609. New header files <curses.h> and <keycodes.h> are provided. <keycodes.h>
  1610. has the prototype for console_set_key(), and has various scan codes
  1611. provided as constants (e.g. F_1 is the scan code for the f1 key).
  1612.  
  1613. fpprint.c: ++jrb
  1614.     replaced decfrexp with a hopefully  better one
  1615.     added rounding at prec+1 (output certainly looks nicer now)
  1616.  
  1617. scanf.c, printf.c, mktemp.c: ++jrb
  1618.     replaced expressions of the form
  1619.         n * 10    [n a integer]
  1620.     with    TEN_MUL(n) == (((n) << 2) + n) << 1 
  1621.             10*n == 2(4n + n)
  1622.  
  1623. atof.c:: ++jrb
  1624.     added ansi func strtod, atof now calls this.
  1625.     added d|D as valid chars for 'E' notation as per ansi.
  1626.     added proto for strtod to stdlib.h
  1627.     corrected bugs in counting total exp.
  1628.     now passes its builtin test (which is biased!)
  1629.     pulled out old dummy strtod #define from stdlib.h
  1630.  
  1631. close.c:: ers
  1632. Fixed bug with isatty status not being properly reset unless an error
  1633. occured.
  1634.  
  1635. unx2dos.c:: ers
  1636. Added a check for two slashes in a row (a common error which can really
  1637. make GEMDOS confused) and for a directory name with a trailing slash
  1638. (Unix apparently accepts access("DIR/",0) as well as access("DIR",0)).
  1639.  
  1640. curses.h:: ers
  1641. Fixed definition of strlen to agree with definition in <string.h>
  1642. (namely size_t strlen(const char *)).
  1643.  
  1644. osbind.h:: ers
  1645. Changed definitions of Fcreate, Fopen, and Fdup to cast result to long
  1646. instead of short. This is because file handles for CON:, AUX:, and PRN:
  1647. are word negative but not long negative, whereas errors are long negative;
  1648. casting to short makes Fopen("CON:",2) appear to give an error.
  1649.  
  1650. getcwd.c:: ers
  1651. The GCC is too clever with this; I had to add the keyword 'volatile' to
  1652. an array to stop it from optimizing away the test in:
  1653. path[2] = '\0'; Dgetpath(path, 0); if (!path[2]) ...
  1654.  
  1655. fflush.c:: ers
  1656. Changed test for buffer full from (fp->_cnt) to (fp->_cnt > 0), since
  1657. when reading fp->_cnt becomes < 0 at EOF, and the subsequent
  1658. lseek(file,-fp->_cnt,1) call will (now) cause the file to grow.
  1659.  
  1660. main.c:: ++jrb
  1661.     if stdout !isatty then make it a full buffered stream rather
  1662.     than a line buffered stream;
  1663.  
  1664. fclose.c:: ++jrb
  1665.     cosmetic changes.
  1666.  
  1667. fopen.c:: ++jrb
  1668.     freopen() was foobared (see comments there). new coding.
  1669.  
  1670. setbuf.c :: ++jrb
  1671.     added bezerkly setlinebuf() and a few asserts.
  1672.  
  1673. include/unixlib.h:: ++jrb
  1674.     added proto for setlinebuf()
  1675.  
  1676. include/assert.h:: ++jrb
  1677.     changed assert #def'n for !__STDC__ compilers that don't
  1678.     do token pasting.
  1679.  
  1680. fpprint.c:: ++jrb
  1681.     brought back the old version(sigh!)
  1682.     added rounding at prec
  1683.     This has to be redone. Due to prec. loss for numbers near 1 or near 10
  1684.     it prints stuff like "0.9:00e0" etc.
  1685.     now that modf() etc work almost exactly, we can re-code using those.
  1686.  
  1687. Special thanks to peter housel who posted his x86 based floating
  1688. lib. many of the alg used in the now improved floating support
  1689. are fashioned after peters alg.
  1690.  
  1691. norm.c:: ++jrb
  1692.     new file, normalize a ieee double
  1693.  
  1694. atof.c:: ++jrb
  1695.     totally re-worked, now its much more like i wanted it to be.
  1696.     better test
  1697.  
  1698. ldexp.c, modf.c, frexp.c:: ++jrb
  1699.     totally reworked. ldexp now always takes an int as it should have,
  1700.     so sldexp is no longer need for shortlib. (see #ifdefs in ldexp.c)
  1701.     better tests (see also pml/envtest)
  1702.     the combined test for ldexp/frexp is in frexp.c
  1703.  
  1704. sldexp.c:: ++jrb
  1705.     moved to notused/sdlexp.c
  1706.  
  1707. *akefile.16:: ++jrb
  1708.     took out sldexp.o target from all of them
  1709.  
  1710. *akefile*:: ++jrb
  1711.     added target norm.o
  1712.  
  1713. doprnt.c, sprintf.c, fprintf.c:: ++jrb
  1714.     Finally, adopted berkley's PD doprnt(). It does things right
  1715.     and much better than kludges i was trying to get especially
  1716.     the fpprint right (i still cannot come up with a alg for
  1717.     decrexp that does not loose badly on prec). appropriate
  1718.     adjustments made to sprintf.c and fprintf.c.
  1719.  
  1720. fpprint.c, printf.c, prtfld.c:: ++jrb
  1721.     moved to notused/ because of above.
  1722.  
  1723. *akefile:: ++jrb
  1724.     adjusted to above two changes.
  1725.  
  1726. varargs.h, stdarg.h:: ++jrb
  1727.     fixed bugs when va_arg is expanded with type 'char'
  1728.     thanks to dale schumacher for detecting this.
  1729.  
  1730. *makefile.*:: ers
  1731.     added abs.o (how did we miss this one???)
  1732.     fixed typo in makefile.16
  1733.  
  1734. qsort.c:: ers
  1735.     added cast to an argument (needed for -mshort)
  1736.  
  1737. vfork.c:: ers
  1738.     changed so that child process uses the same stack as the parent; this
  1739.     is what Un*x does, and saves memory.
  1740.     fixed wait() to be Un*x compatible.
  1741.  
  1742. spawnve.c:: ers
  1743.     made storage for environment+args dynamic; gnu make was losing on
  1744.     big files (e.g. nethack) because 2K wasn't enough.
  1745.  
  1746. system.c:: ers
  1747.     changed call to wait to agree with changes above.
  1748.  
  1749. findfile.c:: ers
  1750.     fixed search for extensions (.ttp, .prg, etc) so that it works with
  1751.     _unixmode > 2.
  1752.  
  1753. doprnt.c,scanf.c:: ers
  1754.     changed __NO_FLOATS__ to __NO_FLOAT__ to agree with makefiles.
  1755.  
  1756. qsort.c:: ++jrb
  1757.     merged in minix changes (i have to support both!)
  1758.     as per ers change above, adjust arg for _wqsort()and _lqsort() too.
  1759.     additional assumption: if SHORT alignment is desired then
  1760.     it is ok to align a long at a short boundary too. this seems
  1761.     to be generally true (of course someone will come up with a
  1762.     weird machine where it is untrue - maybe intel!).
  1763.     To do : define a threshold and do insertion sort below threshold
  1764.         remove recursion
  1765.  
  1766. qsort.c :: ++jrb
  1767.     Finally a qsort that kicks ass! (and works :-).
  1768.     the old one moved to notused/dl_qsort.c
  1769.     qsort.c: i started with doug smidth's version,
  1770.     first hacked it to handle SIZE sized items (his was ints only)
  1771.     the performance sucked, so i totally rewamped the algorithm in
  1772.     qsort(), following Sedgewick and suggestions in K V3.
  1773.  
  1774. dflonum.c:: ++jrb
  1775.     House cleaning.
  1776.  
  1777. fixnum.s::  ++jrb
  1778.     Merged in kai-uwe's code (thanks kai).
  1779.     Fixed a few bugs. Cleanup.
  1780.  
  1781. popen.c:: ++jrb
  1782.     Added kau-uwe's popen/pclose with appropriate mods for this library.
  1783.     The basic difference was that this libraries system() already did
  1784.     re-direction, so we take advantage of that fact to avoid doing
  1785.     re-direction in popen/pclose. Thanks again kai-uwe.
  1786.  
  1787. stdio.h:: ++jrb
  1788.     added protos for popen()/pclose() (in non strict ansi part).
  1789.  
  1790. *akefile:: ++jrb
  1791.     reflect the addition of popen.c
  1792.  
  1793. dirent.c:: ers
  1794.     fixed opendir() to work correctly with non-existent directories.
  1795.     Also made seekdir() actually do some work.
  1796.  
  1797. sys/dir.h:: ers
  1798.     took advantage of undocumented feature of dirent.c, namely that
  1799.     d->reclen contains the length of the name.
  1800.  
  1801. fixnum.s:: ++jrb
  1802.     kai-uwe's fixnum has problem. pulled it out and re-instated the
  1803.     old one. will look into whats going on.
  1804.  
  1805. fixnum.s:: ++jrb
  1806.     fixed bugs in kai's version and put it back (it is much more
  1807.     efficient).
  1808.  
  1809. fcntl.h, close.c, open.c, isatty.c, fhandle.c:: ++jrb
  1810.     replaced char __handle_stat[] with a open files status structure
  1811.     __open_stat[], that keeps more info around about open files,
  1812.     enabling impl of fstat(). later more fields can be added as required.
  1813.     Also Note: while making these changes, took care of the fact that
  1814.     the smallest valid gemdos handle is -3 and not 0. See
  1815.     __SMALLEST_VALID_HANDLE and __OPEN_INDEX macros in <fcntl.h>
  1816.  
  1817. stat.c, stat.h :: ++jrb
  1818.     added fstat(int, struct stat *)
  1819.  
  1820. scanf.c :: ++jrb
  1821.     floating conversion uses our super atof now after collecting the
  1822.     input number as a string.
  1823.  
  1824. popen.c:: ers
  1825.     fixed up popen(cmd, "r") calls to redirect properly; also they
  1826.     return NULL if cmd fails (return code < 0).
  1827.  
  1828. vfork.c:: ers
  1829.     changed to reflect the fact that exit codes are really short on
  1830.     the ST.
  1831. TODO:: scanf
  1832.     when getting from a line buffered isatty stream, flush it before
  1833.     getting (like bezerkley)
  1834.  
  1835. gnulib2.c:: ++jrb
  1836.     new file. contains long long support for gcc, and a few funcs
  1837.     that moved over from dflonum.
  1838.  
  1839. *akefile*:: ++jrb
  1840.     added gnulib2 targets
  1841.  
  1842. close.c:: ers
  1843.     checked that __open_stat.filename was non-null before freeing
  1844.  
  1845. malloc.c:: ers
  1846.     allowed free(0) to do nothing (I think ANSI wants this)
  1847.  
  1848. open.c:: ers
  1849.     added _canonical() function to get full pathname of a file, so
  1850.     fstat() can work after a chdir().
  1851.  
  1852. textio.c:: ers
  1853.     new functions to read/write text files doing nl conversion
  1854.     (this seems to crop up a lot, especially in GNU stuff)
  1855.  
  1856. localtime.c:: ers
  1857.     fixed so that days have 24 hours, not 23 :-)
  1858.  
  1859. strdup.c:: ers
  1860.     new function strdup() added (GNU and system V both use it)
  1861.  
  1862. unlink.c:: ers
  1863.     changed so unlink of an open file works (well, usually)
  1864.  
  1865. dup.c:: ers
  1866.     changed dup2 so that it closes the original file, and returns
  1867.     the file descriptor on success
  1868.